﻿

using System;
using System.Threading.Tasks;
using System.Linq.Expressions;

using Oliving.Edge.Model;
using Oliving.Edge.Model.Dto;
using Oliving.Edge.Model.Models;
using Oliving.Edge.IServices;
using Oliving.Edge.IRepository;
using Oliving.Edge.Services.BASE;



using Oliving.Edge.Model.School;
using Oliving.Edge.IRepository.School;
using Oliving.Edge.IServices.School;
using Oliving.Edge.Model.Dto.School;

namespace Oliving.Edge.Services.School
{
    public partial class School_AchievementServices : BaseServices<School_Achievement>, ISchool_AchievementServices
    {
        ISchool_AchievementRepository _dal;
        public School_AchievementServices(ISchool_AchievementRepository dal)
        {
            this._dal = dal;
            base.BaseDal = dal;
        }

        public async Task<PageModel<School_AchievementPageDto>> QueryPageList(
            Expression<Func<School_Achievement, bool>> whereExpression,
            int intPageIndex = 1,
            int intPageSize = 20,
            string strOrderByFileds = null)
        {
            var page = await _dal.QueryPageList(whereExpression, intPageIndex, intPageSize, strOrderByFileds);
            return page;
        }

        public async Task<PageModel<School_AchievementPageDto>> QueryPageList(
            Expression<Func<School_Achievement, bool>> whereExpression,
            int pageIndex = 1, int pageSize = 20,
            string sortField = null, string sortOrder = null
            )
        {
            var page = await _dal.QueryPageList(
                whereExpression,
                pageIndex, pageSize,
                 sortField, sortOrder);
            return page;
        }
    }
}

